package com.link2room.aeriabots.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by Administrator on 2017/3/13.
 */
@Entity
@Table(name = "reverse_log")
public class ReverseLogEntity extends BaseEntity {
    private String tradeNo;
    private String l2rNo;
    private String refundNo;
    private String resultCode;
    private String returnCode;
    private String channel;
    private String appid;
    private String resXML;
    private String reqXML;
    @Basic
    @Column(name = "trade_no")
    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }
    @Basic
    @Column(name = "refund_no")
    public String getRefundNo() {
        return refundNo;
    }

    public void setRefundNo(String reundNo) {
        this.refundNo = reundNo;
    }

    @Basic
    @Column(name = "l2r_no")
    public String getL2rNo() {
        return l2rNo;
    }

    public void setL2rNo(String l2rNo) {
        this.l2rNo = l2rNo;
    }

    @Basic
    @Column(name = "result_code")
    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String result) {
        this.resultCode = result;
    }
    @Basic
    @Column(name = "return_code")
    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }
    @Basic
    @Column(name = "channel")
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }
    @Basic
    @Column(name = "appid")
    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }
    @Basic
    @Column(name = "res_XML")
    public String getResXML() {
        return resXML;
    }

    public void setResXML(String resXML) {
        this.resXML = resXML;
    }
    @Basic
    @Column(name = "req_XML")
    public String getReqXML() {
        return reqXML;
    }

    public void setReqXML(String reqXML) {
        this.reqXML = reqXML;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ReverseLogEntity that = (ReverseLogEntity) o;

        if (!tradeNo.equals(that.tradeNo)) return false;
        if (!l2rNo.equals(that.l2rNo)) return false;
        if (!resultCode.equals(that.resultCode)) return false;
        if (!returnCode.equals(that.returnCode)) return false;
        if (!channel.equals(that.channel)) return false;
        if (!appid.equals(that.appid)) return false;
        if (!resXML.equals(that.resXML)) return false;
        return reqXML.equals(that.reqXML);
    }

    @Override
    public int hashCode() {
        int result = tradeNo.hashCode();
        result = 31 * result + l2rNo.hashCode();
        result = 31 * result + resultCode.hashCode();
        result = 31 * result + returnCode.hashCode();
        result = 31 * result + channel.hashCode();
        result = 31 * result + appid.hashCode();
        result = 31 * result + resXML.hashCode();
        result = 31 * result + reqXML.hashCode();
        return result;
    }
}
